/**
 * Copyright (c) 2007,中企动力华南研发中心
 * All rights reserved.
 */
package com.ce.pms.customer.vo;

import org.apache.commons.lang.StringUtils;

import com.sitechasia.webx.core.model.IViewObject;

/**
 * 功能描述：
 * @author 易贤建 创建日期：2008-6-6
 */
public class ChooseSingleHouseVO implements IViewObject {
	private Long buildId; //楼栋ID
	private Long houseGrpId;//单元ID
	private String selectId;//楼栋+单元ID--逗号分割  下拉列表使用
	private String selectText; //楼栋+单元名称 下拉列表使用

	public ChooseSingleHouseVO(){

	}
	public ChooseSingleHouseVO(String selectId,String selectText){
		setSelectId(selectId);
		setSelectText(selectText);
	}
	public Long getBuildId() {
		return buildId;
	}
	public void setBuildId(Long buildId) {
		this.buildId = buildId;
	}
	public Long getHouseGrpId() {
		return houseGrpId;
	}
	public void setHouseGrpId(Long houseGrpId) {
		this.houseGrpId = houseGrpId;
	}
	public String getSelectId() {
		return selectId;
	}
	public void setSelectId(String selectId) {
		this.selectId = selectId;

		if(selectId != null && selectId.indexOf(",") != -1){
			String[] tempArray = selectId.split(",");

			setBuildId(Long.valueOf(tempArray[0]));
			if(tempArray[1] != null)
				setHouseGrpId(Long.valueOf(tempArray[1]));
		}else {
			setBuildId(Long.valueOf(selectId));
		}
	}
	public String getSelectText() {
		return selectText;
	}
	public void setSelectText(String selectText) {
		this.selectText = selectText;
	}

}
